<ui:composition template="/admin/templates/ui2.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/facelets/tags">
	<ui:define name="content">
	<script src="http://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
	<script>
//	<![CDATA[
// 		 解释一下goto参数，参考以下例子：
// 		alert();
		var url = encodeURIComponent("http://www.summor.cn");
		var _goto = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=appid&response_type=code&scope=snsapi_login&state=STATE&redirect_uri="+url);
		
		var obj = DDLogin({
		     id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id，例如<div id="login_container"></div>或<span id="login_container"></span>
		     goto: _goto, //请参考注释里的方式
		     style: "border:none;background-color:#FFFFFF;",
		     width : "365",
		     height: "400"
		 });
		//]]>
	</script>
		<div class="entry">
			<p:toolbar>
				<p:toolbarGroup>
					<h:outputLabel style="padding-left: 15px;"
						value="#{commonMsg.currentPositionLabel}通联对asdfasf账"></h:outputLabel>
				</p:toolbarGroup>
			</p:toolbar>
			<h:form id="form">
				<p:panel id="filters">
<!-- 					<p:calendar id="settleDate" -->
<!-- 						value="#{reconciliationHome.settleDate}" pattern="yyyy-MM-dd" -->
<!-- 						navigator="true" showButtonPanel="true" required="true" -->
<!-- 						label="结算时间" /> -->
					
					<p:commandButton process="filters"
						action="#{dingDingHome.batchSyncUser()}" value="批量绑定钉钉用户"></p:commandButton>
					<p:commandButton process="filters"
						action="#{testHome.testMessage()}" value="消息弹框"></p:commandButton>
					<p:commandButton process="filters"
						action="#{testHome.testMessage1()}" value="消息弹框1"></p:commandButton>
						
				</p:panel>
<!-- 				<p:watermark for="settleDate" value="结算时间"></p:watermark> -->
<!-- 				<p:watermark for="settleDate1" value="营销检查时间"></p:watermark> -->
				<p:spacer></p:spacer>
				<p:spacer></p:spacer>

				<div id="login_container"></div>
			</h:form>
		</div>
	</ui:define>
</ui:composition>
